-- GENERATED SPELL FOR [Crimson Courier] --


function spell0_12337(pUnit, Event) --@Exorcism,n/a--
pUnit:FullCastSpellOnTarget(17149,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12337', 642, 1)
end

function spell1_12337(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(13005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12337', 6318, 1)
end

function spell2_12337(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(15493,pUnit)
pUnit:RegisterEvent('Sorts_12337', 2500, 1)
end

function spell3_12337(pUnit, Event) --@Holy Strike,n/a--
pUnit:FullCastSpellOnTarget(17143,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12337', 593, 1)
end

function spell4_12337(pUnit, Event) --@Resistance Aura,Self--
pUnit:FullCastSpellOnTarget(19726,pUnit)
pUnit:RegisterEvent('Sorts_12337', 553, 1)
end

function spell5_12337(pUnit, Event) --@Turn Undead,n/a--
pUnit:FullCastSpellOnTarget(19725,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12337', 21500, 1)
end

function Sorts_12337(pUnit, Event)
local choix_sorts_12337 = math.random(0, 5)
if choix_sorts_12337 == 0 then
pUnit:RegisterEvent('spell0_12337', 1, 1)
end
if choix_sorts_12337 == 1 then
pUnit:RegisterEvent('spell1_12337', 1, 1)
end
if choix_sorts_12337 == 2 then
pUnit:RegisterEvent('spell2_12337', 1, 1)
end
if choix_sorts_12337 == 3 then
pUnit:RegisterEvent('spell3_12337', 1, 1)
end
if choix_sorts_12337 == 4 then
pUnit:RegisterEvent('spell4_12337', 1, 1)
end
if choix_sorts_12337 == 5 then
pUnit:RegisterEvent('spell5_12337', 1, 1)
end
end

function mob12337_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12337', math.random(1500, 3000), 1)
end

function mob12337_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12337_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12337_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12337, 1, 'mob12337_Action')
RegisterUnitEvent(12337, 2, 'mob12337_Leave')
RegisterUnitEvent(12337, 3, 'mob12337_Kill')
RegisterUnitEvent(12337, 4, 'mob12337_Die')
